#!/usr/bin/env bash

if [ $# != 1 ]; then
    echo -e "
Usage:
    dc-port imgName/ctnName
"
   exit 1
fi

echo "【docker port】"
docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $1